1. Field of the Invention
The present invention generally relates to an application of data processing, and more particularly to the application of data processing with a pivot analysis based on XML (eXtensible Markup Language) and XSL (extensible Stylesheet Language).
2. Description of the Prior Art
SQL (Structured Query Language) is a standard language used to access the data in a relational database, for instance, to insert, acquire, modify and delete the data. In addition, the SQL includes statements that are used to define and manage the objects in a relational database. SQL is published and available from ISO (International Organization for Standardization) and ANSI (American National Standards Institute), and several relational databases support SQL.
In the related prior art, a user manually uses SQL to convert the raw data in a relational database into a cross table. A practical example of expenditure data will be described in the following, and Table 1 depicts the raw data of the practical example. First, moving the data for each column item manually as shown in FIG. 1A, this includes three commands as shown in the following:                DECODE (Expenditure city, ‘Kaohsiung city’, Expenditure persons, 0)        DECODE (Expenditure city, ‘Hsinchu city’, Expenditure persons, 0)        DECODE (Expenditure city, ‘Taipei city’, Expenditure persons, 0)        
Next, aggregating some relational data of the expenditure data, this is shown in FIG. 1B. Accordingly, the cross table built up by the user is shown in Table 2. However, the problems of the above-mentioned method include, the column item being moved is a fixed column item set and it is not dynamic; the setting process is heavy and complicated and thus it is difficult to maintain and revise; and the user have to view the aggregate data and detail data in different pages and thus it loses the relationship between the aggregate data and the detail data.
TABLE 1ExpenditureExpenditureInstitutional cityExpenditure citypersonsDateTaipei cityTaipei city300002003/1/1Taipei cityTaipei city30002003/1/2Taipei cityHsinchu city3002003/1/3Taipei cityKaohsiung city302003/1/31Hsinchu cityTaipei city200002003/1/1Hsinchu cityTaipei city20002003/1/2Hsinchu cityHsinchu city2002003/1/3Hsinchu cityKaohsiung city202003/1/31Kaohsiung cityTaipei city100002003/1/1Kaohsiung cityTaipei city10002003/1/2Kaohsiung cityHsinchu city1002003/1/3Kaohsiung cityKaohsiung city102003/1/31
TABLE 2ExpenditureExpenditureExpenditurepersons ofInstitutionalExpenditurepersons ofpersons ofKaohsiungcitypersonsTaipei cityHsinchu citycityTaipei city333303300030030Hsinchu city222202200020020Kaohsiung111101100010010city